home *** CD-ROM | disk | FTP | other *** search
/ The Music Factory's Encyclopedia of Christmas / The Music Factory's Encyclopedia of Christmas (Christmas Photos and Videos from Maine to California).iso / setup.mst < prev    next >
Text File  |  1995-06-20  |  17KB  |  531 lines

  1. '**************************************************************************
  2. '*           SST Generic Runtime Setup with Video for Windows Runtime 1.1
  3. '**************************************************************************
  4. '$INCLUDE 'setupapi.inc'
  5. '$INCLUDE 'mscpydis.inc'    ''System
  6. '$INCLUDE 'msdetect.inc'    ''Detects Available Disk Space
  7.  
  8. ''Dialog ID's
  9. CONST WELCOME       = 100
  10. CONST ASKQUIT       = 200
  11. CONST EXITFAILURE   = 400
  12. CONST EXITQUIT      = 600
  13. CONST EXITSUCCESS   = 700
  14. CONST APPHELP       = 900
  15.  
  16. CONST DESTPATH      = 300
  17. CONST EXITRUNTIME   = 750
  18. CONST BADPATH       = 6400
  19.  
  20. ' CONST CHECK         = 2500
  21. ' CONST SMALLWIN      = 2200
  22.  
  23. CONST XMASCHOICE        = 7900
  24.  
  25. CONST MB_OKCANCEL       = 1
  26. CONST MB_YESNO          = 4
  27.  
  28. ''Bitmap ID
  29. CONST LOGO = 1
  30.  
  31. GLOBAL SizeReq&  '' Total Disk Size required for installation
  32. GLOBAL CopyVFWFiles
  33. GLOBAL DEST$
  34. GLOBAL SrcDir$
  35.  
  36. ''File Types
  37. GLOBAL WinDir$
  38. GLOBAL WinSysDir$
  39. GLOBAL WINDRIVE$    ''Windows Drive Letter.
  40. GLOBAL CHECKSTATES$
  41. GLOBAL Audio
  42. GLOBAL CDSpeed
  43.  
  44. DECLARE SUB Install
  45. DECLARE FUNCTION MakePath (szDir$, szFile$) AS STRING
  46. DECLARE FUNCTION OnWindowsNT LIB "INIUPD.DLL" AS INTEGER
  47. DECLARE FUNCTION VflatdPresent LIB "iniupd.DLL" AS INTEGER
  48. DECLARE SUB Reboot LIB "iniupd.dll"
  49. DECLARE FUNCTION ExitWindowsExec  LIB "User" (Exec$, Param$) AS INTEGER
  50.  
  51. DECLARE FUNCTION CheckForVFW () AS INTEGER
  52. DECLARE FUNCTION RemoveSlash ( pPath$ ) AS STRING
  53. DECLARE FUNCTION CopyAAPLAYFiles () AS INTEGER
  54. DECLARE SUB ModifyINIFile
  55.  
  56.  
  57. INIT:
  58.   
  59.     CUIDLL$ = "mscuistf.dll"            ''Custom user interface dll
  60.  
  61.     Title$ = "Encylopedia of Christmas Setup"
  62.  
  63.     SetBitmap CUIDLL$, LOGO
  64.     SetTitle Title$
  65.  
  66.     HELPPROC$ = "FHelpDlgProc"          ''Help dialog procedure
  67.     
  68.     WIN32ENABLED% = 0
  69.     MajorVer% = GetWindowsMajorVersion()
  70.     MinorVer% = GetWindowsMinorVersion()
  71.  
  72.     IF MajorVer% < 3 OR (MajorVer% = 3 AND MinorVer% < 10) THEN
  73.         i% = DoMsgBox("Microsoft Windows version 3.10 or greater is required for this software.  Please upgrade your version of Windows.", "Installation Problem", MB_OK+MB_TASKMODAL+MB_ICONHAND)
  74.         END
  75.     END IF
  76.  
  77.     IF OnWindowsNT() THEN
  78.       i% = DoMsgBox("This software does not run on Windows NT.", "Installation Problem", MB_OK+MB_TASKMODAL+MB_ICONHAND)
  79.       END
  80.     END IF
  81.  
  82.     Temp$ = "Version 1.1v" + CHR$(13) + "Copyright (C) 1995, Pipeline Multimedia Productions."
  83.     SetAbout "Setup", TEMP$
  84.  
  85.     szInf$ = GetSymbolValue("STF_SRCINFPATH")
  86.     IF szInf$ = "" THEN
  87.        szInf$ = GetSymbolValue("STF_CWDDIR") + "SETUP.INF"
  88.     END IF
  89.     SrcDir$ = GetSymbolValue("STF_SRCDIR")
  90.  
  91.     ReadInfFile szInf$
  92.  
  93.     WINDRIVE$ = MID$(GetWindowsDir, 1, 1)
  94.  
  95. WELCOME:
  96.     sz$ = UIStartDlg(CUIDLL$, WELCOME, "FInfoDlgProc", APPHELP, HELPPROC$)
  97.     IF sz$ = "CONTINUE" THEN
  98.     UIPop 1
  99.     ELSE
  100.     GOSUB ASKQUIT
  101.     GOTO WELCOME
  102.     END IF
  103.  
  104.     DEST$ = "C:\XMAS"
  105.  
  106. GETPATH:
  107.     SetSymbolValue "EditTextIn", DEST$
  108.     SetSymbolValue "EditFocus", "END"
  109. GETPATHL1:
  110.     sz$ = UIStartDlg(CUIDLL$, DESTPATH, "FEditDlgProc", APPHELP, HELPPROC$)
  111.     DEST$ = GetSymbolValue("EditTextOut")
  112.  
  113.     IF sz$ = "CONTINUE" THEN
  114.     IF IsDirWritable(DEST$) = 0 THEN
  115.         GOSUB BADPATH
  116.         GOTO GETPATHL1
  117.     END IF
  118.     DESTDRIVE$ = MID$(DEST$, 1, 1)
  119.     FreeSpace& = GetFreeSpaceForDrive(DEST$) 
  120.     IF FreeSpace& < SpaceNeeded& THEN
  121.         GOSUB MORESPACE
  122.         GOTO GETPATHL1
  123.     ENDIF
  124.     UIPop 1
  125.     ELSEIF sz$ = "REACTIVATE" THEN
  126.     GOTO GETPATHL1
  127.     ELSEIF sz$ = "BACK" THEN
  128.     UIPop 1
  129.     GOTO WELCOME
  130.     ELSE
  131.     GOSUB ASKQUIT
  132.     GOTO GETPATH
  133.     END IF
  134.  
  135.  
  136.     DEST$ = RemoveSlash( DEST$ )
  137.  
  138.  
  139.     CHECKSTATES$ = "CheckItemsState"
  140. '    STATUSTEXT$  = "StatusItemsText"
  141. '    DRIVETEXT$   = "DriveStatusText"
  142.  
  143.  
  144.     ' Setting defaults...
  145.     AddListItem CHECKSTATES$, "ON"
  146.     Audio = 8
  147.     AddListItem CHECKSTATES$, "OFF"
  148.     AddListItem CHECKSTATES$, "ON"
  149.     CDSpeed = 2             
  150.     AddListItem CHECKSTATES$, "OFF"
  151.  
  152. CUSTINST:
  153.     sz$ = UIStartDlg(CUIDLL$, XMASCHOICE, "FCustInstDlgProc", APPHELP, HELPPROC$)
  154.  
  155.     IF sz$ = "CONTINUE" THEN
  156.     UIPop 1
  157.     GOTO INSTALL_LABEL
  158.     ELSEIF sz$ = "PATH" THEN
  159.     GOTO GETPATH
  160.     ELSEIF sz$ = "CHK1" THEN
  161.         Audio = 8
  162.     GOTO CUSTINST
  163.     ELSEIF sz$ = "CHK2" THEN
  164.         Audio = 16
  165.     GOTO CUSTINST
  166.     ELSEIF sz$ = "CHK3" THEN
  167.         CDSpeed = 2
  168.     GOTO CUSTINST
  169.     ELSEIF sz$ = "CHK4" THEN
  170.         CDSpeed = 4 
  171.     GOTO CUSTINST
  172.  
  173.     ELSEIF sz$ = "REACTIVATE" THEN
  174.     GOTO CUSTINST
  175.     ELSE
  176.     GOSUB ASKQUIT
  177.     GOTO CUSTINST
  178.     END IF
  179.  
  180.  
  181. INSTALL_LABEL:
  182. 'Temp$ = "Audio is " + str$(Audio) + ".  CD ROM is " + str$(CDSpeed)
  183. 'i% = DoMsgBox(Temp$, "DEBUG", MB_YESNO+MB_TASKMODAL )
  184.  
  185.  
  186. CreateDir DEST$, cmoNone
  187. OpenLogFile MakePath(DEST$, "LOGFILE.OUT"), 0
  188.  
  189. ''Prepare Copy list and check size
  190.  
  191.     ClearCopyList
  192.     SrcDir$ = GetSymbolValue("STF_SRCDIR")
  193.     WinDir$ = GetWindowsDir()
  194.     WindDir$ = GetWindowsDir()
  195.     WinSysDir$ = GetWindowsSysDir()
  196.  
  197. '' Check to see if VFW installed, ask to install if not there?
  198.     CopyVFWFiles = 0
  199.     Temp$ = ""
  200.     InstallVideo% = CheckForVFW
  201.     IF InstallVideo% = 1 THEN       ' Found Old copy of VFW...
  202.         ' Old Version found
  203.         Temp$ = "An old runtime version of Video for Windows was found "
  204.         Temp$ = Temp$ + "on your machine.  "
  205.         Temp$ = Temp$ + CHR$(13) +CHR$(13)+ "Do you wish to install an updated "
  206.         Temp$ = Temp$ + "version of Video for Windows 1.1e at this time?"
  207.     ENDIF
  208.     IF InstallVideo% = 2 THEN       ' None found...
  209.           ' No Version Found
  210.         Temp$ = "Video for Windows has not been located on your machine.  "
  211.         Temp$ = Temp$ + CHR$(13) +CHR$(13)+ "Do you wish to install "
  212.         Temp$ = Temp$ + "the runtime version of Video for Windows 1.1e at this time?"
  213.     END IF
  214.         
  215. 'Temp$ = "Video for Windows has not been located on your machine.  "
  216. 'Temp$ = Temp$ + CHR$(13) +CHR$(13)+ "Do you wish to install "
  217. 'Temp$ = Temp$ + "the runtime version of Video for Windows 1.1e at this time?"
  218.  
  219.  
  220.  
  221.     IF Temp$ <> "" THEN
  222.         'i% = DoMsgBox(Temp$, "Attention Installer!", MB_YESNO+MB_TASKMODAL+MB_ICONHAND)
  223.         i% = DoMsgBox(Temp$, "Attention Installer!", MB_YESNO+MB_TASKMODAL )
  224.         IF i% = 6 THEN
  225.     ''      Runtime files (on Windows disk)
  226.             CopyVFWFiles = -1
  227.     
  228.             AddSectionFilesToCopyList "VfW Runtime", SrcDir$ + "VFW1_1\", WinSysDir$
  229.             AddSectionFilesToCopyList "OLE2", SrcDir$ + "VFW1_1\", WinSysDir$
  230.             AddSectionFilesToCopyList "ACM Drivers", SrcDir$ + "VFW1_1\", WinSysDir$
  231.             AddSectionFilesToCopyList "MPlayer", SrcDir$ + "VFW1_1\", WinDir$
  232.             AddSectionFilesToCopyList "AVICodecs", SrcDir$ + "VFW1_1\", WinSysDir$
  233.         ELSE
  234.             CopyVFWFiles = 0
  235.         END IF
  236.     ENDIF
  237.  
  238.     AddSectionFilesToCopyList "Icons", SrcDir$, DEST$
  239.     AddSectionFilesToCopyList "SST Runtime", SrcDir$ + "SST\", DEST$
  240.     IF CopyAAPLAYFiles = 1 THEN
  241.         AddSectionFilesToCopyList "AAPLAY", SrcDir$ + "SST\", WinSysDir$
  242.     ENDIF
  243.     AddSectionFilesToCopyList "TrueMotionS", SrcDir$+ "TMotion\Drivers\", WinSysDir$
  244.     
  245. ''  Check windrive diskspace
  246.     SizeReq& = GetCopyListCost ("","", "")
  247. '    IF SizeReq& <> 0 THEN
  248. '               GOSUB SMALLWIN
  249. '               END
  250. '    END IF
  251.  
  252.     Install
  253.     
  254.     ModifyINIFile
  255.  
  256.     CloseLogFile
  257.  
  258. '' Restart Windows: if it has to updates ACM from DOS, it restarts Windows automatically
  259. '' else, it gives the user the choice
  260.     RESTRT% = RestartListEmpty ()
  261.     Exe$ = WindDir$ + "\_msrstrt.exe"
  262.     Batch$ = WindDir$ + "\_mssetup.bat"
  263.     empty$ = ""
  264.  
  265. RESTART:
  266.  
  267.     IF CopyVFWFiles = -1 THEN       
  268.         Temp$ = "Windows must be restarted to complete this installation." + chr$(13) + chr$(13)
  269.         Temp$ = Temp$ + "Click OK to restart Windows." + chr$(13) 
  270.         Temp$ = Temp$ + "Click Cancel to exit this Setup program and return to Windows."
  271.         i% = DoMsgBox(Temp$, "Attention Installer!", MB_OKCANCEL )
  272.     
  273.         IF i% = 1 THEN '' OK, go ahead and restart Windows...
  274.             I% = ExitWindowsExec (Exe$, empty$)
  275.             IF I% = 0 THEN
  276.                 GOTO RESTART
  277.             ELSE
  278.                 END
  279.             ENDIF
  280.         END IF
  281.     ENDIF
  282.  
  283.  
  284. QUIT:
  285.     ON ERROR GOTO ERRQUIT
  286.  
  287.     IF ERR = 0 THEN
  288.     dlg% = EXITSUCCESS
  289.     ELSEIF ERR = STFQUIT THEN
  290.     dlg% = EXITQUIT
  291.     ELSE
  292.     dlg% = EXITFAILURE
  293.     END IF
  294. QUITL1:
  295.     sz$ = UIStartDlg(CUIDLL$, dlg%, "FInfo0DlgProc", 0, "")
  296.     IF sz$ = "REACTIVATE" THEN
  297.     GOTO QUITL1
  298.     END IF
  299.     UIPop 1
  300.     END
  301.  
  302. ERRQUIT:
  303.     i% = DoMsgBox("An installation problem occured, call the product support service", "Setup Problem", MB_OK+MB_TASKMODAL+MB_ICONHAND)
  304.     END
  305.  
  306.  
  307. ASKQUIT:
  308.     sz$ = UIStartDlg(CUIDLL$, ASKQUIT, "FQuitDlgProc", 0, "")
  309.  
  310.     IF sz$ = "EXIT" THEN
  311.     UIPopAll
  312. ''        ERROR STFQUIT
  313.     END
  314.     ELSEIF sz$ = "REACTIVATE" THEN
  315.     GOTO ASKQUIT
  316.     ELSE
  317.     UIPop 1
  318.     END IF
  319.     RETURN
  320.  
  321. BADPATH:
  322.     sz$ = UIStartDlg(CUIDLL$, BADPATH, "FInfo0DlgProc", 0, "")
  323.     IF sz$ = "REACTIVATE" THEN
  324.     GOTO BADPATH
  325.     END IF
  326.     UIPop 1
  327.     RETURN
  328.  
  329. MORESPACE:
  330.     Temp$ = "This program needs " + STR$(SpaceNeeded&) + " bytes to install." + CHR$(13)
  331.     Temp$ = Temp$ + "There is only " + STR$(FreeSpace&) +" bytes free."
  332.     i% = DoMsgBox( Temp$, "Not Enough Disk Space", MB_OK+MB_TASKMODAL+MB_ICONHAND)
  333.     RETURN
  334.  
  335. 'SMALLWIN:
  336. '    sz$ = UIStartDlg(CUIDLL$, SMALLWIN, "FInfo0DlgProc", 0, "")
  337. '    IF sz$ = "REACTIVATE" THEN
  338. '       GOTO SMALLWIN
  339. '    END IF
  340. '    UIPop 1
  341. '    RETURN
  342.  
  343. '**
  344. '** Purpose:
  345. '**     Performs all installation operations.
  346. '** Arguments:
  347. '**     none.
  348. '** Returns:
  349. '**     none.
  350. '*************************************************************************
  351. SUB Install STATIC
  352.  
  353.     SetRestartDir WinDir$
  354.     CopyFilesInCopyList
  355.  
  356.     If CopyVFWFiles = -1 THEN
  357. ''Updating WIN.INI and SYSTEM.INI
  358.         IF VflatdPresent() = 0 THEN
  359.            CreateSysIniKeyValue WinDir$ + "system.ini", "386Enh", "device", "dva.386", cmoOverwrite
  360.         END IF
  361.         CreateIniKeyValue WinDir$ + "system.ini", "Drivers", "VIDC.IV32", "ir32.dll", cmoOverwrite
  362.         CreateIniKeyValue WinDir$ + "system.ini", "Drivers", "VIDC.IV31", "ir32.dll", cmoOverwrite
  363.         CreateIniKeyValue WinDir$ + "system.ini", "Drivers", "VIDC.RT21", "ir21.dll", cmoOverwrite
  364.         CreateIniKeyValue WinDir$ + "system.ini", "Drivers", "VIDC.YVU9", "iyvu9.dll", cmoOverwrite
  365.         CreateIniKeyValue WinDir$ + "WIN.INI", "mci extensions", "avi", "AVIVideo", cmoOverwrite
  366.         CreateIniKeyValue WinDir$ + "system.ini", "mci", "AVIVideo", "mciavi.drv", cmoOverwrite
  367.         CreateIniKeyValue WinDir$ + "system.ini", "Drivers", "WaveMapper", "msacm.drv", cmoOverwrite
  368.         CreateIniKeyValue WinDir$ + "system.ini", "Drivers", "MSACM.msadpcm", "msadpcm.acm", cmoOverwrite
  369.         CreateIniKeyValue WinDir$ + "system.ini", "Drivers", "MSACM.imaadpcm", "imaadpcm.acm", cmoOverwrite
  370.         CreateIniKeyValue WinDir$ + "control.ini", "drivers.desc", "msacm.drv", "Microsoft Sound Mapper V2.00", cmoOverwrite
  371.         CreateIniKeyValue WinDir$ + "control.ini", "drivers.desc", "msadpcm.acm", "Microsoft ADPCM Codec V2.00", cmoOverwrite
  372.         CreateIniKeyValue WinDir$ + "control.ini", "drivers.desc", "imaadpcm.acm", "Microsoft IMA ADPCM Codec V2.00", cmoOverwrite
  373.         Run ("regedit.exe /s " + MakePath(WinDir$, "mplayer.reg"))
  374.         Run ("regedit.exe /s " + MakePath(WinSysDir$, "OLE2.reg"))
  375.         Run ("regedit.exe /s " + MakePath(WinSysDir$, "cleanup.reg"))
  376.     
  377.     '' Mplayer
  378.         CreateProgmanItem "Accessories", "Media Player", MakePath(WinDir$, "mplayer.exe"), "", cmoOverwrite
  379.     END IF                  ' CopyVFWFiles = -1
  380.  
  381.     CreateProgmanGroup "The Encyclopedia of Christmas", "", cmoNone
  382.     ShowProgmanGroup "The Encyclopedia of Christmas", 1, cmoNone
  383.  
  384. ' Icons in group are below.
  385.     NoIcon$ = ""
  386.     Icon$ = DEST$ + "\xmas.ico, , 1, 1," + DEST$
  387.  
  388. IF Audio = 8 THEN
  389.     CreateProgmanItem "The Encyclopedia of Christmas", "The Encyclopedia of Christmas", DEST$ + "\SST.exe " + SrcDir$ + "XMAS\8CMAS2X.Car", Icon$, cmoOverwrite
  390.     CreateProgmanItem "The Encyclopedia of Christmas", "Read Me 1ST", "Write.exe " + Dest$ + "\ReadMe.wri", NoIcon$, cmoOverwrite    
  391. ENDIF
  392.  
  393. IF Audio = 16 THEN
  394.     IF CDSpeed = 2 THEN
  395.         CreateProgmanItem "The Encyclopedia of Christmas", "The Encyclopedia of Christmas", DEST$ + "\SST.exe " + SrcDir$ + "XMAS\16CMAS2X.Car", Icon$, cmoOverwrite
  396.           CreateProgmanItem "The Encyclopedia of Christmas", "Read Me 1ST", "Write.exe " + Dest$+"\ReadMe.wri", NoIcon$, cmoOverwrite    
  397.     ELSE
  398.         CreateProgmanItem "The Encyclopedia of Christmas", "The Encyclopedia of Christmas", DEST$ + "\SST.exe " + SrcDir$ + "XMAS\16CMAS4X.Car", Icon$, cmoOverwrite
  399.         CreateProgmanItem "The Encyclopedia of Christmas", "Read Me 1ST", "Write.exe " + Dest$+"\ReadMe.wri", NoIcon$, cmoOverwrite    
  400.     ENDIF
  401. ENDIF
  402.  
  403.     IF CopyVFWFiles = -1 THEN
  404.         Run ("profdisp.exe")   
  405.     END IF
  406. END SUB
  407.  
  408. '**
  409. '** Purpose:
  410. '**     Appends a file name to the end of a directory path,
  411. '**     inserting a backslash character as needed.
  412. '** Arguments:
  413. '**     szDir$  - full directory path (with optional ending "\")
  414. '**     szFile$ - filename to append to directory
  415. '** Returns:
  416. '**     Resulting fully qualified path name.
  417. '*************************************************************************
  418. FUNCTION MakePath (szDir$, szFile$) STATIC AS STRING
  419.     IF szDir$ = "" THEN
  420.     MakePath = szFile$
  421.     ELSEIF szFile$ = "" THEN
  422.     MakePath = szDir$
  423.     ELSEIF MID$(szDir$, LEN(szDir$), 1) = "\" THEN
  424.     MakePath = szDir$ + szFile$
  425.     ELSE
  426.     MakePath = szDir$ + "\" + szFile$
  427.     END IF
  428. END FUNCTION
  429.  
  430. FUNCTION CheckForVFW STATIC AS INTEGER
  431.     CheckForVFW = 0
  432.     AVIVideo$ = GetIniKeyString( "SYSTEM.INI", "MCI", "AVIVideo" )
  433.     WriteToLogFile "AVIVideo$ is " + AVIVideo$
  434.     IF AVIVideo$ <> "" THEN
  435.         Version$ = GetVersionOfFile(AVIVideo$)
  436.         WriteToLogFile "AVIVideo Version is " + Version$
  437.         NthField& = GetVersionNthField(Version$, 1)
  438.         IF NthField& <= 1 THEN
  439.             NthField& = GetVersionNthField(Version$, 2)
  440.             WriteToLogFile "2nd Version field of AVIVideo$ is " + str$(NthField)
  441.             IF NthField& < 10 THEN
  442.                 CheckForVFW = 1         ' Found Old Version
  443.             ELSE
  444.                 IF NthField& = 10 THEN
  445.                     NthField& = GetVersionNthField(Version$, 4)
  446.                     WriteToLogFile "4th Version field of AVIVideo$ is " + str$(NthField)
  447.                     IF NthField& < 181 THEN
  448.                         CheckForVFW = 1         ' Found Old Version
  449.                     END IF
  450.                 ENDIF
  451.             ENDIF
  452.         ENDIF
  453.  
  454.     ELSE
  455.         CheckForVFW = 2         ' Did not find VFW Runtime
  456.     END IF
  457. END FUNCTION
  458.  
  459. FUNCTION RemoveSlash ( pPath$ ) STATIC AS STRING
  460.  
  461.     tmp% = INSTR( LEN( pPath$) - 1, pPath$, "\" )
  462.     IF tmp% > 0 THEN
  463.         RemoveSlash = MID$( pPath$, 1, LEN( pPath$) - 1)
  464.     ELSE
  465.         RemoveSlash = pPath$
  466.     END IF
  467. END FUNCTION
  468.  
  469. FUNCTION CopyAAPLAYFiles STATIC AS INTEGER
  470.     Copy% = 0
  471.     AutoDesk$ = GetIniKeyString( "WIN.INI", "AAPLAY Animation", "FullScreen" )
  472.     IF AutoDesk$ = "" THEN
  473.         Copy% = 1
  474.     ELSE
  475.         SystemDir$ = GetWindowsSysDir()
  476.         AAVGA$ = FindFileInTree("AAVGA.DLL", SystemDir$)
  477.         AAPLAY$ = FindFileInTree("AAPLAY.DLL", SystemDir$)
  478.         IF AAPLAY$ = "" THEN
  479.             ' Remove Section from INI file when AAPLAY.DLL not found.
  480.             i% = FRemoveIniSection ( "WIN.INI", "AAPLAY Animation", cmoForce)
  481.             Copy% = 1
  482.         ELSE
  483.             Copy% = 0
  484.         ENDIF
  485.     ENDIF
  486.     CopyAAPLAYFiles = Copy%
  487. END FUNCTION
  488.  
  489. SUB ModifyINIFile STATIC
  490.     INIFile$ = Dest$ + "\SST.INI"
  491.     CreateIniKeyValue INIFile$, "SST", "picturedir", (SrcDir$ + "XMAS"), cmoOverwrite
  492.     CreateIniKeyValue INIFile$, "SST", "picturetype", "1", cmoOverwrite
  493.     CreateIniKeyValue INIFile$, "SST", "sounddir", (SrcDir$ + "XMASV"), cmoOverwrite
  494.     CreateIniKeyValue INIFile$, "SST", "soundtype", "1", cmoOverwrite
  495.     CreateIniKeyValue INIFile$, "SST", "carouseldir", SrcDir$ + "XMAS", cmoOverwrite
  496.     CreateIniKeyValue INIFile$, "SST", "userselectdir", SrcDir$ + "XMAS", cmoOverwrite
  497.     CreateIniKeyValue INIFile$, "SST", "altered", "0", cmoOverwrite
  498.     IF CDSpeed = 4 THEN
  499.         CreateIniKeyValue INIFile$, "SST", "moviedir", (SrcDir$ + "XMAS\4XVIDEO"), cmoOverwrite
  500.     ELSE
  501.         CreateIniKeyValue INIFile$, "SST", "moviedir", (SrcDir$ + "XMAS\2XVIDEO"), cmoOverwrite
  502.     ENDIF
  503.         CreateIniKeyValue INIFile$, "SST", "movietype", "2", cmoOverwrite
  504.  
  505.         SYSIni$ = WinDir$ + "SYSTEM.INI"
  506.         CopyFile SYSIni$, WinDir$ + "SYSTEM.ASK", cmoOverwrite, 0
  507.     ' Disable MIDI warning message...
  508.         CreateIniKeyValue SysIni$, "mciseq.drv", "disablewarning", "true", cmoOverwrite
  509.         MCIAudio$ = GetIniKeyString( "SYSTEM.INI", "MCI", "WaveAudio" )
  510.         IF MCIAudio$ <> "" THEN
  511.             IF INSTR(LCASE$(MCIAudio$), "mciwave.drv") THEN
  512.                 CreateIniKeyValue SysIni$, "MCI", "WaveAudio", "mciwave.drv 9", cmoOverwrite
  513.                 ' WriteToLogFile "Setting MCI Audio buffer to 9 Seconds"
  514.             ELSE
  515.                 ' WriteToLogFile "WaveAudio not mciwave.drv, not setting buffer."
  516.             ENDIF
  517.         ELSE
  518.             ' WriteToLogFile "MCI - WaveAudio not detected, not setting buffer."
  519.         ENDIF
  520.  
  521.         CreateIniKeyValue SysIni$, "drivers", "vidc.tmot", "truemo.drv" , cmoOverwrite
  522.  
  523.         IF ((NOT OnNT$ = "TRUE") AND MinorVer% < 50) THEN
  524.             IF VflatdPresent() = 0 THEN
  525.                CreateSysIniKeyValue WinDir$ + "system.ini", "386Enh", "device", "dva.386", cmoOverwrite
  526.             END IF
  527.         END IF
  528.         CreateIniKeyValue "WIN.INI", "TrueMotion", "VideoHardware", "OFF" , cmoOverwrite
  529. END SUB
  530.  
  531.